﻿using DataServer.CommonLib.Models.DataConfig;
using Swimj.CommonLib.Base;
using Swimj.Core.DependencyInjection;

namespace DataServer.ApplicationLib.Services
{
    public interface IDataConfigService : IScopedDependency
    {
        Task<PaginatedResult<DataConfigInfoResponseDto>> QueryDataConfigsByPageAsync(DataConfigSearchRequestDto model);

        Task<Result<IList<DataConfigInfoResponseDto>>> QueryDatabasesAsync(DataConfigSearchRequestDto model);

        Task<Result<DataConfigInfoResponseDto>> GetDataConfigAsync(Guid id);

        Task<Result<DataConfigInfoResponseDto>> CreateDataConfigAsync(DataConfigEditRequestDto model);

        Task<Result<DataConfigInfoResponseDto>> UpdateDataConfigAsync(Guid id, DataConfigEditRequestDto model);

        Task<Result<IList<ConfigFieldInfoResponseDto>>> QueryFieldsByConfigAsync(string configCode, ConfigFieldSearchRequestDto model);

        Task<Result<ConfigFieldInfoResponseDto>> CreateFieldAsync(string configCode, ConfigFieldEditRequestDto model);

        Task<PaginatedResult<ConfigFieldInfoResponseDto>> QueryFieldsByPageConfigAsync(string configCode, ConfigFieldSearchRequestDto model);

        Task<Result<ConfigFieldInfoResponseDto>> GetConfigFieldAsync(Guid id);

        Task<Result<ConfigFieldInfoResponseDto>> UpdateFieldAsync(Guid id, ConfigFieldEditRequestDto model);

        Task<PaginatedResult<ConfigRuleInfoResponseDto>> QueryRulesByPageConfigAsync(string configCode, ConfigRuleSearchRequestDto model);

        Task<Result<IList<ConfigRuleInfoResponseDto>>> QueryRulesByConfigAsync(string configCode, ConfigRuleSearchRequestDto model);

        Task<Result<ConfigRuleInfoResponseDto>> CreateRuleAsync(string configCode, ConfigRuleEditRequestDto model);

    }
}